﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public static class StringToolKit
{
    /// <summary>
    /// 字符串切割
    /// 正常的切割字符串只能是单个字符
    /// </summary>
    /// <param name="originStr">原始字符串</param>
    /// <param name="moreChar">切割字符串</param>
    /// <returns></returns>
    public static string[] CharSplit(string originStr, string moreChar)
    {
        if (moreChar.Length <= 0) return null;
        else if(moreChar.Length == 1)
            return originStr.Split(moreChar[0]);
        else
            return System.Text.RegularExpressions.Regex.Split(originStr, moreChar);
    }
}
